<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var age = 60;

        // switch 后面的括号中 放的是表达式
        // case后面没有括号 直接写最终的值
        switch (age) {
            case 18:
                console.log('成年人');
                break;
            case 60:
                console.log('老成年人');
                break;
            default:
                console.log('我负责兜底');
                break;
        }
    </script>
</body>

</html>